home *** CD-ROM | disk | FTP | other *** search
/ Aminet 37 / Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso / Aminet / dev / basic / PureBasic.lha / PureBasic_Demo / PureBasic / Examples / DemoVersion_Sources / Window.pb < prev   
Encoding:
Text File  |  2000-03-19  |  1.1 KB  |  52 lines

  1. ;
  2. ; **********************************
  3. ;
  4. ; Window example file for Pure Basic
  5. ;
  6. ;    © 1999 - Fantaisie Software -
  7. ;
  8. ; **********************************
  9. ;
  10.  
  11. WBStartup()                 ; This program could be launched from workbench
  12.  
  13. InitWindow(0)               ; We will need one window
  14. *TagList = InitTagList(20)
  15.  
  16. ; Fill up our taglist.
  17. ; !!! WARINING !!! You MUST use an title variable for EACH window
  18.  
  19. Title.s = "Demo Window Example"
  20.  
  21.    ResetTagList(#WA_Title , @Title)
  22. If OpenWindow(0, 10, 80, 200, 150, #WFLG_CLOSEGADGET | #WFLG_DEPTHGADGET | #WFLG_DRAGBAR, *TagList)   ; If our window is opened...
  23.  
  24.   H = WindowHeight() ; Get some window informations
  25.   W = WindowWidth()  ;
  26.   X = WindowX()      ;
  27.   Y = WindowY()      ;
  28.  
  29.   PrintN("Height:"+Str(H)+", Width:"+Str(W)+", Coords(X,Y): ("+Str(X)+","+Str(Y)+")")
  30.  
  31.   Delay(50)
  32.  
  33.   MoveWindow(100,0)
  34.  
  35.   Delay(50)
  36.  
  37.   SizeWindow(200,200)
  38.  
  39.   BevelBox(10,20,50,30,0)  ; Draw nice 3D box on our window
  40.   BevelBox(10,60,50,30,1)  ;
  41.  
  42.   ; Wait for the user press the close gadget
  43.   ;
  44.   Repeat
  45.     IDCMP.l = WindowEvent()
  46.     Delay(1)
  47.   Until IDCMP = #IDCMP_CLOSEWINDOW
  48.  
  49. EndIf
  50.  
  51. End
  52.